package com.itheima.exerciseTest.method10_19.method13;

import java.util.TreeSet;

public class Demo {
    public static void main(String[] args) {
        TreeSet<Student> ts = new TreeSet<>();

        Student s1 = new Student("张三",100,100,100);
        Student s2 = new Student("李四",90,100,100);
        Student s3 = new Student("王五",100,80,100);
        Student s5 = new Student("王五",100,80,100);
        Student s4 = new Student("张三",100,100,100);

        ts.add(s1);
        ts.add(s2);
        ts.add(s3);
        ts.add(s4);
        ts.add(s5);

        for (Student t : ts) {
            System.out.println(t);
        }
    }
}
